import service from "./index.js";
const courseApi = {
    get(){
        return service.get('/course').then(resp=>resp.data)
    },
    getComprehensiveCourses(){
        return service.get('/course/getComprehensiveCourses').then(resp=>resp.data)
    },
    getLatestCourses(){
        return service.get('/course/getLatestCourses').then(resp=>resp.data)
    },
    getPopularCourses(){
        return service.get('/course/getPopularCourses').then(resp=>resp.data)
    },
    getCourse(id){
        return service.get('/course/getCourse',{params:{id:id}}).then(resp=>resp.data)
    },
    getMyCourses(){
        return service.get('/course/getMyCourses').then(resp=>resp.data)
    }
}
export default courseApi